package com.easybuy.pojo;

import org.apache.ibatis.type.Alias;

import java.util.Date;

//订单表实体类
@Alias("order")
public class Order {
      private int id;  //主键
      private int userId; //用户主键
      private String loginName; //登录名
      private String userAddress; //用户地址
      private Date createTime; //创建时间
      private float cost; //总消费
      private String serialNumber; //订单号

      @Override
      public String toString() {
            return "Order{" +
                    "id=" + id +
                    ", userId=" + userId +
                    ", loginName='" + loginName + '\'' +
                    ", userAddress='" + userAddress + '\'' +
                    ", createTime=" + createTime +
                    ", cost=" + cost +
                    ", serialNumber='" + serialNumber + '\'' +
                    '}';
      }

      public Order(int id, int userId, String loginName, String userAddress, Date createTime, float cost, String serialNumber) {
            this.id = id;
            this.userId = userId;
            this.loginName = loginName;
            this.userAddress = userAddress;
            this.createTime = createTime;
            this.cost = cost;
            this.serialNumber = serialNumber;
      }

      public Order() {
      }

      public int getId() {
            return id;
      }

      public void setId(int id) {
            this.id = id;
      }

      public int getUserId() {
            return userId;
      }

      public void setUserId(int userId) {
            this.userId = userId;
      }

      public String getLoginName() {
            return loginName;
      }

      public void setLoginName(String loginName) {
            this.loginName = loginName;
      }

      public String getUserAddress() {
            return userAddress;
      }

      public void setUserAddress(String userAddress) {
            this.userAddress = userAddress;
      }

      public Date getCreateTime() {
            return createTime;
      }

      public void setCreateTime(Date createTime) {
            this.createTime = createTime;
      }

      public float getCost() {
            return cost;
      }

      public void setCost(float cost) {
            this.cost = cost;
      }

      public String getSerialNumber() {
            return serialNumber;
      }

      public void setSerialNumber(String serialNumber) {
            this.serialNumber = serialNumber;
      }
}
